<md-dialog class="addMainActivity">
  <md-toolbar style="min-height: 60px;height: 60px;">
    <div class="md-toolbar-tools">
      <h2 ng-if="!page.pageInfo.summaryId">新增重大活动总结</h2>

      <h2 ng-if="page.pageInfo.summaryId">修改重大活动总结</h2>
      <span flex></span>
      <md-button class="md-icon-button" ng-click="page.cancel()">
        X
      </md-button>
    </div>
  </md-toolbar>
  <md-dialog-content>
    <div class="form-content">
      <div layout="column">
        <md-content class="top-tj" md-theme="docs-dark" layout-padding layout="row" layout-sm="column">
          <md-input-container>
            <label>总结页面名称</label>
            <input type="text" ng-model="page.pageInfo.summaryName">
          </md-input-container>
          <label class="theme-label">活动主题</label>
          <md-select ng-model="page.pageInfo.activityId">
            <md-option ng-repeat="activity in page.activityList" ng-click="page.switchActivity(activity)"
                       ng-value="activity.activityId">
              {{activity.activityName}}
            </md-option>
          </md-select>
        </md-content>
        <md-content class="top-tj" md-theme="docs-dark" layout-padding layout="row" layout-sm="column">
          <label class="theme-label">活动时间：</label>
          <label>{{page.pageInfo.activityTime}}</label>
          <label class="theme-label">参与活动省</label>
          <label style="width: calc(100% - 500px);height: 20px;overflow: hidden;overflow-y: auto;line-height: initial;margin-top: 22px;">{{page.pageInfo.activityProvince}}</label>
        </md-content>
        <md-content md-theme="docs-dark" layout-padding layout="row" layout-sm="column" style="padding: 0;">
          <div class="function-medule">
            <div class="medule-title">
              功能模块
            </div>
            <div class="medule-myTab">
              <table border="1">
                <tr ng-repeat="root in page.pageInfo.dataList">
                  <td>{{root.moduleName}}</td>
                  <td>
                    <ul class="ul01">
                      <li ng-repeat="child in root.childModule">
                        <md-checkbox ng-model="child.checked" ng-change="page.checkedChild(child)">
                          {{child.moduleName}}
                        </md-checkbox>
                      </li>
                    </ul>
                  </td>
                  <td style="border-right: 1px solid transperent;">
                    <ul class="ul02" ng-repeat="child in root.childModule">
                      <li ng-repeat="subChild in child.childModule"
                          style="width: calc(100% / {{child.childModule.length}});">
                        <md-checkbox ng-model="subChild.checked" ng-change="page.checkedSubChild(child, subChild)">
                          {{subChild.moduleName}}
                        </md-checkbox>
                      </li>
                    </ul>
                  </td>
                </tr>
                <tr>
                  <td>显示设置</td>
                  <td>
                    <ul class="ul01">
                      <li>
                        <md-checkbox ng-model="page.pageInfo.displaySetting.time">
                          显示活动时间
                        </md-checkbox>
                      </li>
                      <li>
                        <md-checkbox ng-model="page.pageInfo.displaySetting.province">
                          显示活动参与省
                        </md-checkbox>
                      </li>
                    </ul>
                  </td>
                  <td></td>
                </tr>
              </table>
            </div>
          </div>
        </md-content>
      </div>
    </div>
  </md-dialog-content>
  <div class="md-actions" layout="row" style="position: relative;padding-right: 80px; color: #fff; font-weight: bold;">
    <md-button class="md-button md-default-theme" ng-click="page.cancel()" style="background-color: #FF9800;">
      取消
    </md-button>
    <md-button ng-click="page.confirm($event)" style="background-color: #FF9800;">
      提交
    </md-button>
    <md-button ng-click="page.preview()"
               style="position: absolute;left:50%;background-color:#FF9800;margin-left:-43px;">
      预览
    </md-button>
  </div>
  <core-loading ng-hide="page.loading"></core-loading>
</md-dialog>